package com.serviceImpl;

import com.javabean.Orders;
import com.mapper.OrdersMapper;
import com.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    OrdersMapper ordersMapper;
    @Override
    public List<Orders> findAll() {
        return ordersMapper.selectAll();
    }

    @Override
    public List<Orders> findAllData(String orderNum, String productName) {
        return ordersMapper.selectLikeOrdersNumOrProductName(orderNum, productName);
    }

    @Override
    public Orders findById(int id) {
        return ordersMapper.selectById(id);
    }
}
